package com.cuit.service;

import com.cuit.dao.ZhangWuDao;
import com.cuit.domain.ZhangWu;

import java.util.List;

public class ZhangWuService {
    // service是依赖于dao的
    private ZhangWuDao zhangWuDao = new ZhangWuDao();

    public List<ZhangWu> selectAll() {
        return zhangWuDao.selectAll();
    }

    public List<ZhangWu> selectByCreatTime(String sDate, String edate) {
        return zhangWuDao.selectByCreatTime(sDate, edate);
    }

    public int addZhangWu(ZhangWu zhangWu) {
        return zhangWuDao.addZhangWu(zhangWu);
    }

    public List<ZhangWu> searchZhangWu(String zw) {
        return zhangWuDao.searchZhangWu(zw);
    }

    public int deleteZhangWu(int id) {
        return zhangWuDao.deleteZhangWu(id);
    }

    public int editZhangWu(ZhangWu zhangWu) {
        return zhangWuDao.editZhangWu(zhangWu);
    }
}
